[mirrors]
http://www.php.net/distributions/php-7.0.5.tar.xz

[vars]
filesize=11461716
sha512=9a91c1748bc2034016b4d25a116c96e7f60bc48a698864ed7f805870a2c5f6f75aa9a24ec4501403ba1fd45baccfefb2076db149da03c00dabc12e3190068c7c
desc='heavily broken scripting language for web development'

[deps]
gettext
freetype
libedit
re2c
curl
db
libressl
openssh
libjpeg
libpng
zlib
pcre
libxml2
json-c
bzip2

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine) \
  --with-sysroot=$butch_root_dir"

[ -z "$butch_prefix" ] && butch_prefix=/
pfx="$butch_prefix"
# all the below *_cv_ tests fail because the php configure tests
# use exit() but dont include stdlib.h. same for strcmp and string.h etc.
LDFLAGS="-Wl,--no-keep-memory  $optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
CFLAGS="-D_BSD_SOURCE -D_GNU_SOURCE $optcflags" ./configure -C $xconfflags \
  --prefix="$butch_prefix" --enable-re2c-cgoto \
  --mandir="$butch_prefix"/share/man \
  _cv_have_broken_glibc_fopen_append=no \
  ac_cv_what_readdir_r=POSIX ac_cv_broken_sprintf=no \
  ac_cv_crypt_blowfish=yes ac_cv_crypt_md5=yes ac_cv_crypt_SHA256=yes \
  ac_cv_crypt_SHA512=yes ac_cv_crypt_des=yes ac_cv_crypt_ext_des=yes \
  ac_cv_pwrite=yes ac_cv_pread=yes \
  --with-curlwrappers --with-libxml-dir="$pfx" --with-jpeg-dir="$pfx" \
  --with-png-dir="$pfx" --with-openssl-dir="$pfx" --with-sqlite3 \
  --with-pcre-regex="$pfx" --with-pcre-dir="$pfx" --with-zlib="$pfx" \
  --with-zlib-dir="$pfx" --with-curl="$pfx" --with-bz2="$pfx" \
  --with-db4="$pfx" --with-gmp="$pfx" \
  --with-libedit="$pfx" --with-freetype-dir="$pfx" \
  --enable-maintainer-zts \

make -j$MAKE_THREADS
make INSTALL_ROOT="$butch_install_dir" install
